home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16078 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.5 KB  |  48 lines

  1. Newsgroups: comp.lang.c++
  2. Path: in1.uu.net!world!mv!usenet
  3. From: ENGR@GSSI.MV.COM (Michael Furman)
  4. Subject: Re: malloc() function and new operator
  5. Message-ID: <DpLKGo.MG0@mv.mv.com>
  6. Mime-Version: 1.0
  7. Content-Type: Text/Plain; charset=US-ASCII
  8. Organization: GSSI
  9. Date: Tue, 9 Apr 1996 13:36:23 GMT
  10. References: <4kbo18$t1s@news.NetVision.net.il>
  11. X-Newsreader: WinVN 0.99.7
  12. X-Nntp-Posting-Host: gssi.mv.com
  13.  
  14. In article <4kbo18$t1s@news.NetVision.net.il>, 
  15. nir@netvision.net.il says...
  16. >
  17. >I use in my C/C++ programs both malloc() function and new 
  18. operator.
  19. >i use new and delete operators for objects and malloc() and 
  20. free()
  21. >functions for allocating strings and other variables.
  22. >i compile my programs with Borland C++ 4.0 
  23. >it works fine, but i want to be sure that i'm not doing 
  24. something
  25. >wrong that will cause troubles in the future.
  26. >
  27. >Is it o.k to use both of them in the same program ?
  28.  
  29. Nothing wrong, but I don't see any reason for using 
  30. malloc/free in C++
  31. (except only case if you are using realloc that does not 
  32. have C++
  33. equivalent).
  34. -- 
  35. <<< If you received it by E-mail: it is a copy of post to 
  36. the newsgroup >>>
  37. ------------------------------------------------------------
  38. ---
  39. Michael Furman,                       (603)893-1109
  40. Geophysical Survey Systems, Inc.  fax:(603)889-3984
  41. 13 Klein Drive - P.O. Box 97          engr@gssi.mv.com 
  42. North Salem, NH 03073-0097            
  43. 71543.1334@compuserve.com
  44. ------------------------------------------------------------
  45. ---
  46.  
  47.